# -*- coding: UTF-8 -*-
from tools.Request_General import BaseAPI


class RoleStrategy(BaseAPI):
    """
    权限方案组件
    """

    def member_by_user_role(self, payload):
        """
        根据权限方案、用户、角色/角色组查找有权限的维度-维度成员
        """
        r = self.request_send(json=payload)
        return r

    def script_by_role_scheme(self, payload):
        """
        根据权限方案、角色/角色组、用户、维度查找维度表达式
        """
        r = self.request_send(json=payload)
        return r

    def dim_member_by_user(self, payload):
        """
        根据权限方案、维度、用户查找角色/角色组-维度成员组合
        """
        r = self.request_send(json=payload)
        return r

    def role_groups_by_role_scheme(self, payload):
        """
        获取权限方案的角色，角色组
        """
        r = self.request_send(params=payload)
        return r

    def user_seg_members(self, payload):
        """
        根据权限方案、用户id和维度成员查角色、角色组
        """
        r = self.request_send(json=payload)
        return r

    def info(self, payload):
        """
        查询权限方案信息
        """
        r = self.request_send(params=payload)
        return r

    def save_role_scheme(self, payload):
        """
        权限方案保存
        """
        r = self.request_send(json=payload)
        return r

    def module_register_rear(self, payload):
        """
        组件注册后置通知
        """
        r = self.request_send(json=payload)
        return r

    def role_data(self, params):
        """
        查询角色列表
        """
        r = self.request_send(params=params)
        return r

    def role_group_data(self, params):
        """
        查询角色组列表
        """
        r = self.request_send(params=params)
        return r

    def info_list(self, payload):
        """
        查询权限设置列表
        """
        r = self.request_send(json=payload)
        return r


if __name__ == '__main__':
    pass
